import {useEffect} from 'react'
import { Text,Image } from 'react-native'
import { Ionicons } from '@expo/vector-icons';

const Detail = ({navigation, route}) => {
    const {userName} = route.params;
    useEffect(()=>{
        navigation.setOptions(
            {
                // title: userName,
                // headerShown: false,
                headerBackVisible: false,
                headerTitle:() => (
                    <Image 
                        source={require('../../assets/favicon.png')}
                    />
                ),
                headerRight:() => (
                    <Image 
                        source={require('../../assets/favicon.png')}
                    />
                ),
                headerLeft:() => (
                    <Ionicons 
                        onPress={navigation.goBack} 
                        name="chevron-back" 
                        size={30} 
                        color="#fff" 
                    />
                )
            }
        )
    },[])
    return (
        <Text>Detail66</Text>
    )
}

export default Detail